﻿using System;
using System.Windows.Forms;

namespace TextEditor
{
   

    public class A_UnderWriteMark : A_Action
    {
        public override string ActionName()
        {
            return "underwritemark";
        }

        public override bool Execute()
        {
            if (base.myOwnerDocument.Marks.AddMark(base.myOwnerDocument.SaveLogs.CurrentUserName, base.Param1) == null)
            {
                MessageBox.Show(null, "签名失败!", "签名", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            return true;
        }

        public override bool isEnable()
        {
            return (base.myOwnerDocument.CanModify() && base.isEnable());
        }
    }
}

